home *** CD-ROM | disk | FTP | other *** search
/ Computer Select (Limited Edition) / Computer Select.iso / pcmag / v10n18 / cnt.bat < prev    next >
Encoding:
DOS Batch File  |  1991-09-24  |  654 b   |  33 lines

  1. [[CNT.BAT]]«MDNM»
  2.  
  3.  
  4. @echo off
  5. REM   CNT.bat to demonstrate
  6. REM      CHANGEJ.bat
  7. REM   =========================
  8. for %%v in (U T H) DO set %%v=0
  9. cls
  10. echo This routine counts from 1 to
  11. echo 12 and then backwards from 12
  12. echo to 1. This is achieved using
  13. echo DOS statements only. It sets
  14. echo a variable J which may be used
  15. echo for stack-handling. The range
  16. echo of J is 000 thru 999, but can
  17. echo be enlarged easily.
  18. echo.
  19. echo Hit any key to go on ...
  20. pause >nul
  21. cls
  22. :INCR
  23. CALL changej 0 U
  24. echo %J%
  25. if not %J%==012 goto INCR
  26. :DECR
  27. CALL changej 9 U
  28. echo %J%
  29. if not %J%==001 goto DECR
  30. :Z
  31. for %%v in (U T H J) DO set %%v=
  32.  
  33.